@extends('backend::layout')
@section('title',$page_title)
@section('content')
    @component('backend::component.form.form')
        @slot('page_title') {{$page_title}} @endslot
        @slot('formId') config-form @endslot
        @slot('action') {{url()->current()}} @endslot
        @component('backend::component.form.form-group')
            @slot('title')广告位名称@endslot
            @component('backend::component.form.input')
                @slot('name') pos_name @endslot
                @slot('value') {{$info->pos_name ?? ''}} @endslot
            @endcomponent
        @endcomponent

        @component('backend::component.form.form-group')
            @slot('title')广告位宽@endslot
            @component('backend::component.form.input')
                @slot('name') ad_width @endslot
                @slot('value') {{$info->ad_width ?? ''}} @endslot
            @endcomponent
        @endcomponent
        @component('backend::component.form.form-group')
            @slot('title')广告位高@endslot
            @component('backend::component.form.input')
                @slot('name') ad_height @endslot
                @slot('value') {{$info->ad_height ?? ''}} @endslot
            @endcomponent
        @endcomponent

        @component('backend::component.form.form-group')
            @slot('title')允许放置广告数量@endslot
            @component('backend::component.form.input')
                @slot('name') ad_number @endslot
                @slot('value') {{$info->ad_number ?? 1}} @endslot
            @endcomponent
        @endcomponent

        @component('backend::component.form.form-group')
            @slot('title')终端类型@endslot
            @component('backend::component.form.select',['options'=>config('app.client_type')])
                @slot('name') client_type @endslot
                @slot('value') {{$info->client_type ?? '1'}} @endslot
            @endcomponent
        @endcomponent



        @component('backend::component.form.form-group')
            @slot('title')说明@endslot
            @component('backend::component.form.textarea')
                @slot('name') pos_desc @endslot
                @slot('value') {{$info->pos_desc ?? ''}} @endslot
            @endcomponent
        @endcomponent


        @component('backend::component.form.form-group')
            @slot('title')状态@endslot
            @foreach(['0'=>'禁用','1'=>'启用'] as $key=>$item)
                @component('backend::component.radio')
                    @slot('name') status @endslot
                    @slot('title') {{$item}} @endslot
                    @slot('value') {{$key}} @endslot
                    @slot('checked')
                        @if(($info->status??1) == $key) checked @endif
                    @endslot
                @endcomponent
            @endforeach
        @endcomponent
        @slot('buttons')
            @component('backend::component.form.button')
                @slot('title') 提交 @endslot
                @slot('params') {"formId":"#config-form"} @endslot
                @slot('class') btn-min-width ajax-form @endslot
            @endcomponent
            @component('backend::component.form.button')
                @slot('title') 重置 @endslot
                @slot('type') reset @endslot
                @slot('color') danger @endslot
                @slot('class') btn-min-width @endslot
            @endcomponent
        @endslot
    @endcomponent
@endsection